find derivative using difference quotient